#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int MOD = 1e9 + 7;


void solve() {
    int a, b, c;
    cin >> a >> b >> c;
    if(a < b && b < c) {
        cout << "STAIR\n";
    }else if(a < b && b > c) {
        cout << "PEAK\n";
    }else{
        cout << "NONE\n";
    }
}

int main() {
    int t = 1;
    cin >> t;
    while(t--) solve();
    return 0;
}